<?php
class Core_Controller_Action_Helper_Messenger extends Zend_Controller_Action_Helper_FlashMessenger
{
	public function addMessage($message)
    {
        if (parent::$_messageAdded === false) {
            parent::$_session->setExpirationHops(1, null, true);
        }

        if (!is_array(self::$_session->{$this->_namespace})) {
            parent::$_session->{$this->_namespace} = array();
        }

        //parent::$_session->{$this->_namespace}[] = $message;
        $sessionMessages = parent::$_session->{$this->_namespace};
        $sessionMessages[] = $message;
        parent::$_session->{$this->_namespace} = $sessionMessages;

        return $this;
    }    
}
?>